<?php

namespace app\data\model;

use app\index\exception\LogicException;
use think\admin\Model;

class ActContactModel extends Model
{
    protected $table = 'data_article_page_contact';

    //联系信息id
    const CONTACT_ITEM_ID = 2;

    //获取联系信息
    public static function getContact()
    {
        $ins =  self::where('id',self::CONTACT_ITEM_ID)->find();
        if(empty($ins)){
            throw new LogicException('联系信息缺失');
        }
        return $ins;
    }

}